<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: aruntime/src/main/java/nars/storage/TaskLinkBag.java Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dd/d9c/TaskLinkBag_8java_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TaskLinkBag.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../dd/d9c/TaskLinkBag_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * TaskLinkBag.java</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (C) 2008  Pei Wang</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * This file is part of Open-NARS.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * Open-NARS is free software; you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * the Free Software Foundation, either version 2 of the License, or</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * Open-NARS is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * along with Open-NARS.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">package </span>nars.storage;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.<a class="code" href="../../db/dec/namespacenars_1_1entity.html">entity</a>.<a class="code" href="../../d9/d27/classnars_1_1entity_1_1TaskLink.html">TaskLink</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag.html">   29</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag.html">TaskLinkBag</a> <span class="keyword">extends</span> <a class="code" href="../../d9/d37/classnars_1_1storage_1_1Bag.html">Bag</a>&lt;TaskLink&gt; {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a3e624989c1d971f2782b06b6e90a25fe.html#a3e624989c1d971f2782b06b6e90a25fe">   34</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a3e624989c1d971f2782b06b6e90a25fe.html#a3e624989c1d971f2782b06b6e90a25fe">TaskLinkBag</a> (<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a> <a class="code" href="../../d9/d37/classnars_1_1storage_1_1Bag_acd6809918827ba68d36e467706eb05c0.html#acd6809918827ba68d36e467706eb05c0">memory</a>) {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        super(memory);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    }</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a5e403ecfa9aa62dc7f99c214a663ac93.html#a5e403ecfa9aa62dc7f99c214a663ac93">   42</a></span>&#160;    <span class="keyword">protected</span> <span class="keywordtype">int</span> <a class="code" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a5e403ecfa9aa62dc7f99c214a663ac93.html#a5e403ecfa9aa62dc7f99c214a663ac93">capacity</a>() {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">Parameters</a>.<a class="code" href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a630bc52e3f64f122704392a39ba48e79.html#a630bc52e3f64f122704392a39ba48e79">TASK_LINK_BAG_SIZE</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    }</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a5d4d5405045cb42a89a9e2e2444826d9.html#a5d4d5405045cb42a89a9e2e2444826d9">   50</a></span>&#160;    <span class="keyword">protected</span> <span class="keywordtype">int</span> <a class="code" href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a5d4d5405045cb42a89a9e2e2444826d9.html#a5d4d5405045cb42a89a9e2e2444826d9">forgetRate</a>() {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d9/d37/classnars_1_1storage_1_1Bag_acd6809918827ba68d36e467706eb05c0.html#acd6809918827ba68d36e467706eb05c0">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a7af29c523c107978525ac7be038d4130.html#a7af29c523c107978525ac7be038d4130">getTaskForgettingRate</a>().get();</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div>
<div class="ttc" id="classnars_1_1storage_1_1TaskLinkBag_a5d4d5405045cb42a89a9e2e2444826d9_html_a5d4d5405045cb42a89a9e2e2444826d9"><div class="ttname"><a href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a5d4d5405045cb42a89a9e2e2444826d9.html#a5d4d5405045cb42a89a9e2e2444826d9">nars.storage.TaskLinkBag.forgetRate</a></div><div class="ttdeci">int forgetRate()</div><div class="ttdoc">Get the (adjustable) forget rate of TaskLinkBag. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d9c/TaskLinkBag_8java_source.html#l00050">TaskLinkBag.java:50</a></div></div>
<div class="ttc" id="namespacenars_1_1entity_html"><div class="ttname"><a href="../../db/dec/namespacenars_1_1entity.html">nars.entity</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00021">BudgetValue.java:21</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_html"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory.html">nars.storage.Memory</a></div><div class="ttdoc">The memory of the system. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00051">Memory.java:51</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_html"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters.html">nars.storage.Memory.Parameters</a></div><div class="ttdoc">Collected system parameters. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01069">Memory.java:1069</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1TaskLinkBag_a5e403ecfa9aa62dc7f99c214a663ac93_html_a5e403ecfa9aa62dc7f99c214a663ac93"><div class="ttname"><a href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a5e403ecfa9aa62dc7f99c214a663ac93.html#a5e403ecfa9aa62dc7f99c214a663ac93">nars.storage.TaskLinkBag.capacity</a></div><div class="ttdeci">int capacity()</div><div class="ttdoc">Get the (constant) capacity of TaskLinkBag. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d9c/TaskLinkBag_8java_source.html#l00042">TaskLinkBag.java:42</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1TaskLinkBag_a3e624989c1d971f2782b06b6e90a25fe_html_a3e624989c1d971f2782b06b6e90a25fe"><div class="ttname"><a href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag_a3e624989c1d971f2782b06b6e90a25fe.html#a3e624989c1d971f2782b06b6e90a25fe">nars.storage.TaskLinkBag.TaskLinkBag</a></div><div class="ttdeci">TaskLinkBag(Memory memory)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d9c/TaskLinkBag_8java_source.html#l00034">TaskLinkBag.java:34</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Bag_html"><div class="ttname"><a href="../../d9/d37/classnars_1_1storage_1_1Bag.html">nars.storage.Bag</a></div><div class="ttdoc">A Bag is a storage with a constant capacity and maintains an internal priority distribution for retri...</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/dce/Bag_8java_source.html#l00041">Bag.java:41</a></div></div>
<div class="ttc" id="namespacenars_html"><div class="ttname"><a href="../../d7/d81/namespacenars.html">nars</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TaskLink_html"><div class="ttname"><a href="../../d9/d27/classnars_1_1entity_1_1TaskLink.html">nars.entity.TaskLink</a></div><div class="ttdoc">Reference to a Task. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/dce/TaskLink_8java_source.html#l00032">TaskLink.java:32</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a7af29c523c107978525ac7be038d4130_html_a7af29c523c107978525ac7be038d4130"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a7af29c523c107978525ac7be038d4130.html#a7af29c523c107978525ac7be038d4130">nars.storage.Memory.getTaskForgettingRate</a></div><div class="ttdeci">AtomicInteger getTaskForgettingRate()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00516">Memory.java:516</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1TaskLinkBag_html"><div class="ttname"><a href="../../dc/d45/classnars_1_1storage_1_1TaskLinkBag.html">nars.storage.TaskLinkBag</a></div><div class="ttdoc">TaskLinkBag contains links to tasks. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d9c/TaskLinkBag_8java_source.html#l00029">TaskLinkBag.java:29</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Bag_acd6809918827ba68d36e467706eb05c0_html_acd6809918827ba68d36e467706eb05c0"><div class="ttname"><a href="../../d9/d37/classnars_1_1storage_1_1Bag_acd6809918827ba68d36e467706eb05c0.html#acd6809918827ba68d36e467706eb05c0">nars.storage.Bag&lt; TaskLink &gt;::memory</a></div><div class="ttdeci">Memory memory</div><div class="ttdoc">whether this bag has an active window </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/dce/Bag_8java_source.html#l00075">Bag.java:75</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1Parameters_a630bc52e3f64f122704392a39ba48e79_html_a630bc52e3f64f122704392a39ba48e79"><div class="ttname"><a href="../../da/d3b/classnars_1_1storage_1_1Memory_1_1Parameters_a630bc52e3f64f122704392a39ba48e79.html#a630bc52e3f64f122704392a39ba48e79">nars.storage.Memory.Parameters.TASK_LINK_BAG_SIZE</a></div><div class="ttdeci">static final int TASK_LINK_BAG_SIZE</div><div class="ttdoc">Size of TaskLinkBag. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l01129">Memory.java:1129</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_ed82ebcd34e530b246c6fd9032262140.html">aruntime</a></li><li class="navelem"><a class="el" href="../../dir_19496ddff8e6c0f2b6654287ecb1a472.html">src</a></li><li class="navelem"><a class="el" href="../../dir_db9c5934f797909f7296c2c2017f7fc9.html">main</a></li><li class="navelem"><a class="el" href="../../dir_6d74390eb6d6287951075e525bcb9bed.html">java</a></li><li class="navelem"><a class="el" href="../../dir_51a24984472456d47100350cd31f9a7c.html">nars</a></li><li class="navelem"><a class="el" href="../../dir_4abf5de01153d141bed7497320034a7d.html">storage</a></li><li class="navelem"><a class="el" href="../../dd/d9c/TaskLinkBag_8java.html">TaskLinkBag.java</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:58 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
